﻿namespace WinnerCMS.BLL
{
    #region 命名空间

    using System;
    using System.Data;
    using System.Web.UI.WebControls;
    using System.Collections.Generic;
    using Common;
    using Data;
    using Model;

    #endregion

    public partial class ConsultantManage
    {
        private static readonly ConsultantDal MyDAL = new ConsultantDal();


        /// <summary>
        /// 绑定分页数据
        /// </summary>
        /// <param name="pp"></param>
        /// <returns></returns>
        public IList<Consultant> BindList(PagingParam pp)
        {
            return MyDAL.BindList(pp);
        }

        public Result Delete(string IDs)
        {
            Result res = new Result();
            if (string.IsNullOrEmpty(IDs))
            {
                res.Errors = "至少选择一项。";
            }
            else
            {
                MyDAL.Delete(MyConvert.ConvertToArr(IDs));
            }
            return res;
        }

        public void Reply(Consultant model, ref string Err)
        {
            try
            {
                MyDAL.Reply(model);
            }
            catch (Exception exception)
            {
                Err = exception.Message;
            }
        }

        public Consultant ReplyLoad(int ID)
        {
            return MyDAL.ReplyLoad(ID);
        }
    }
}